﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;

using FlatRedBall;
using FlatRedBall.Graphics.Animation;
using FlatRedBall.Math.Geometry;

namespace Runaway
{
    public static class ExtensionMethods
    {

        public static void PixelScale(this Sprite sprite)
        {
            float pixelsPerUnit = SpriteManager.Camera.PixelsPerUnitAt(sprite.Z);
            sprite.ScaleX = .5f * sprite.Texture.Width / pixelsPerUnit;
            sprite.ScaleY = .5f * sprite.Texture.Height / pixelsPerUnit;
        }

        public static float PixelPerUnit(this Sprite sprite)
        {
            return SpriteManager.Camera.PixelsPerUnitAt(sprite.Z);
        }

    }
}